package com.yk.airline.dao.capturewebsite.impl;

import com.yk.airline.dao.capturewebsite.api.ICaptureWebsiteDao;
import com.yk.airline.dao.common.impl.CommonDaoImpl;
import com.yk.airline.model.CaptureWebsiteModel;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Project Name:airlinecrawler
 * File Name:CaptureWebsiteDaoImpl
 * Package Name:com.yk.airline.dao.capturewebsite.impl
 * Date:2018/2/1 15:34
 * Author:zhangshaoyang
 * Description:
 * Copyright (c) 2018, 重庆云凯科技有限公司 All Rights Reserved.
 */
@Repository("captureWebsiteDao")
public class CaptureWebsiteDaoImpl extends CommonDaoImpl<CaptureWebsiteModel> implements ICaptureWebsiteDao {


    @Override
    public List<CaptureWebsiteModel> findAll() {
        String hql = "from CaptureWebsiteModel";
        return super.comSearchDao.findByParams(hql,null);
    }

    @Override
    public int findTotalCount() {
        String hql = "select count(id) from CaptureWebsiteModel";
        return super.comSearchDao.findCount(hql,null);
    }
}
